package com.sugar.properties;

import com.sugar.constant.ThreadPoolProfile;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@ConfigurationProperties(prefix = "app.threadpool")
public class ThreadPoolProperties {

    private ThreadPoolProfile profile = ThreadPoolProfile.MIXED;

    private int corePoolSize = -1;

    private int maxPoolSize = -1;

    private int queueCapacity = 500;

    private int keepAliveSeconds = 60;

    private String threadNamePrefix = "biz-thread-";

    private boolean monitorEnabled = false;

    private int monitorIntervalSeconds = 30;
}
